package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    //1.获取sku基本信息 pms_sku_info
    SkuInfoEntity info;
    //2.获取sku图片信息 pms_sku_image
    List<SkuImagesEntity> images;
    //3.获取Spu的销售属性组合
    List<SkuItemSaleAttrVo> saleAttr;
    //4.获取Spu的介绍
    SpuInfoDescEntity desc;
    //5.获取spu规格属性
    List<SpuItemGroupAttrVo> groupAttrs;
    //6.是否有货 TODO 查询是否有货
    boolean hasStock = true ;

    @Data
    public static class SpuItemGroupAttrVo{
        private String groupName;
        List<SpuBaseAttrVo> baseAttrVos;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }

    SeckillInfoVo seckillInfo;//当前商品的秒杀优惠信息
}
